package com.iyundao.io.mapper;

import com.iyundao.io.model.PartyMember;

import static org.apache.ibatis.jdbc.SqlBuilder.*;

public class PartyMemberSqlProvider {

    public String insertSelective(PartyMember record) {
        BEGIN();
        INSERT_INTO("partymember");
        
        if (record.getId() != null) {
            VALUES("id", "#{id,jdbcType=INTEGER}");
        }
        
        if (record.getPartymembername() != null) {
            VALUES("partymembername", "#{partymembername,jdbcType=VARCHAR}");
        }
        
        if (record.getPartymembersex() != null) {
            VALUES("partymembersex", "#{partymembersex,jdbcType=VARCHAR}");
        }
        
        if (record.getPartymemberbirthday() != null) {
            VALUES("partymemberbirthday", "#{partymemberbirthday,jdbcType=DATE}");
        }
        
        if (record.getPartymemberjointime() != null) {
            VALUES("partymemberjointime", "#{partymemberjointime,jdbcType=DATE}");
        }
        
        if (record.getPartymemberphone() != null) {
            VALUES("partymemberphone", "#{partymemberphone,jdbcType=VARCHAR}");
        }
        
        if (record.getPartymemberaddress() != null) {
            VALUES("partymemberaddress", "#{partymemberaddress,jdbcType=VARCHAR}");
        }
        
        return SQL();
    }
}